{include file="public/header" /}





<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>商城订单</h3>
            </div>
            {include file="public/admin_items" /}
        </div>
    </div>
    <form method="get">
        <div class="ds-search-form">
            <dl>
                <dt>
                    <select name="type">
                        <option value="order_sn" {if condition="$Request.param.type eq 'order_sn'"}selected{/if}>{$Think.lang.ds_order_sn}</option>
                        <!-- <option value="refund_sn" {if condition="$Request.param.type eq 'refund_sn'"}selected{/if}>{$Think.lang.ds_refund_sn}</option>
                        <option value="store_name" {if condition="$Request.param.type eq 'store_name'"}selected{/if}>运营商名称</option> -->
                       <!-- <option value="goods_name" {if condition="$Request.param.type eq 'goods_name'"}selected{/if}>商品名称</option>-->
                        <option value="buyer_name" {if condition="$Request.param.type eq 'buyer_name'"}selected{/if}>{$Think.lang.ds_buyer_name}</option>
                    </select>
                </dt>
                <dd><input style="margin-top: 4px;" type="text" class="text" name="key" value="{$Request.param.key}" /></dd>
            </dl>
            <dl>
                <dt>发票类型</dt>
                <dd>
                    <select name="order_state" class="querySelect">
                        <option value="">{$Think.lang.ds_please_choose}</option>
                        <option value="1" {if condition="$Request.param.order_state eq '1'"}selected{/if}>商城订单</option>
                        <option value="2" {if condition="$Request.param.order_state eq '2'"}selected{/if}>项目定制订单</option>
                        <option value="3" {if condition="$Request.param.order_state eq '3'"}selected{/if}>服务订单</option>
                    </select>
                </dd>
            </dl>
            <dl style="margin-top: 3px;">
                <dt>时间设置：</dt>
                <dd>
                    <input class="txt date" type="text" value="{$Request.param.add_time_from}" id="add_time_from" name="add_time_from">
                    ~ 
                    <input class="txt date" type="text" value="{$Request.param.add_time_to}" id="add_time_to" name="add_time_to"/>
                </dd>
            </dl>
            <div class="btn_group">
                <input type="submit" class="btn" value="{$Think.lang.ds_search}">
                {if $type != ''  || $query_start_time != '' | $query_end_time != ''}
                <a style="margin-top: -50px;margin-left: 93px;" href="{:url('Refund/invoice_manage')}" class="btn btn-default" title="{$Think.lang.ds_cancel}">{$Think.lang.ds_cancel}</a>
                {/if}
            </div>
        </div>
    </form>


    <table class="ds-default-table">
        <thead>
            <tr class="thead">
                <th>大订单编号</th>
                <th>发票类型</th>
                <th>{$Think.lang.ds_buyer_name}</th>
                <th class="align-center">订单总额</th>
                <th class="align-center">下单时间</th>
                <th class="align-center">发票申请时间</th>
                <th class="align-center">状态</th>
                
                <th class="align-center">{$Think.lang.ds_handle}</th>
            </tr>
        </thead>
        {notempty name="refund_list"}
        <tbody>
            {foreach name="refund_list" item="val" key="key" }
            <tr class="bd-line" >
                <td>
                    {if condition="($val.invoice_type==1)"}{$val.order_sn}
                    {elseif condition="($val.invoice_type==2)"}{$val.order_sns}
                    {elseif condition="($val.invoice_type==3)"}{$val.order_sn}
                    {/if}
                </td>
                <td>
                    {if condition="($val.invoice_type==1)"}商城订单
                    {elseif condition="($val.invoice_type==2)"}项目定制订单
                    {elseif condition="($val.invoice_type==3)"}服务订单
                    {/if}
                </td>
                <td>{$val.member_name}</td>
                <td>
                    {if condition="($val.app_order_type==1)"}{$val.price}
                    {elseif condition="($val.app_order_type==2)"}{$val.project_price}
                    {elseif condition="($val.app_order_type==3)"}{$val.price}
                    {/if}
                </td>
                <td class="align-center">{$val.create_time|date="Y-m-d H:i:s",###}</td>
                <td class="align-center">{$val.c_time|date="Y-m-d H:i:s",###}</td>
                <td class="align-center">
                    {if condition="($val.invoice_status==1)"}待审核
                        {elseif condition="($val.invoice_status==2)"}审核成功
                        {elseif condition="($val.invoice_status==3)"}审核失败
                    {/if}
                </td>
                <td class="align-center">
                    <a href="javascript:dsLayerOpen('{:url('Order/order_list',['order_id'=>$val.app_order_id])}','{$Think.lang.ds_view}-{$val.order_sn}')" class="dsui-btn-view"><i class="iconfont"></i>{$Think.lang.ds_view}</a>
                    
                    <a href="javascript:dsLayerOpen('{:url('Order/invoice_state',['order_id'=>$val.app_order_id])}','申请发票')" class="dsui-btn-edit"><i class="iconfont"></i>审核</a>

                </td>
            </tr>
           {/foreach}
        </tbody>
        {else/}
        <tbody>
            <tr class="no_data">
                <td colspan="20">{$Think.lang.no_record}</td>
            </tr>
        </tbody>
        {/notempty}
    </table>
    {$show_page}
</div>

<script type="text/javascript">
    $(function() {
        $('#add_time_from').datepicker({dateFormat: 'yy-mm-dd'});
        $('#add_time_to').datepicker({dateFormat: 'yy-mm-dd'});
    });
    $((function($){

            $.datepicker.regional['zh-CN'] = {

                clearText: '清除',

                clearStatus: '清除已选日期',

                closeText: '关闭',

                closeStatus: '不改变当前选择',

                prevText: '<上月',

                prevStatus: '显示上月',

                prevBigText: '<<',

                prevBigStatus: '显示上一年',

                nextText: '下月>',

                nextStatus: '显示下月',

                nextBigText: '>>',

                nextBigStatus: '显示下一年',

                currentText: '今天',

                currentStatus: '显示本月',

                monthNames: ['一月','二月','三月','四月','五月','六月', '七月','八月','九月','十月','十一月','十二月'],

                monthNamesShort: ['一','二','三','四','五','六', '七','八','九','十','十一','十二'],

                monthStatus: '选择月份',

                yearStatus: '选择年份',

                weekHeader: '周',

                weekStatus: '年内周次',

                dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],

                dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],

                dayNamesMin: ['日','一','二','三','四','五','六'],

                dayStatus: '设置 DD 为一周起始',

                dateStatus: '选择 m月 d日, DD',

                dateFormat: 'yy-mm-dd',

                firstDay: 1,

                initStatus: '请选择日期',

                showMonthAfterYear:true,//是否把月放在年的后面  

                yearSuffix: '年', //年的后缀  

                isRTL: false

                  };

            $.datepicker.setDefaults($.datepicker.regional['zh-CN']);

        })(jQuery));
</script>
